package com.chuanke.ckfamily.service.util;

import com.chuanke.ckfamily.service.constant.Constant;

public class OssUtil {
	/**
	 * 返回家族头像
	 * @param icon
	 * @return
	 */
	public static String getFamilyIcon(String icon) {

		StringBuffer sb = new StringBuffer();
		if (Constant.oss_url.endsWith("/")) {
			sb.append(Constant.oss_url);
		} else {
			sb.append(Constant.oss_url).append("/");
		}
		sb.append("family_icon");
		if (icon.startsWith("/")) {
			sb.append(icon);
		} else {
			sb.append("/").append(icon);
		}
		return sb.toString();
	}
}
